<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新品有戏后台管理</title>
    <link href="__STATIC__/layui/css/layui.css" rel="stylesheet">
    <link href="__CSS__/boot.css" rel="stylesheet">
    <script src="__JS__/jquery.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
</head>
<body>
    {include file="base/header" /}
    <div style="width: 600px ;margin: 0 auto">
        <div class="layui-carousel"  id="img">
            <div carousel-item >
                {foreach $result as $val}
                    <div><img src="__ROOT__\{$val.image}" width="600"></div>
                {/foreach}
            </div>
        </div>
        <div style="width: 50px;margin: 0 auto;margin-top: 5px"><button type="button" onclick="back()" class="btn btn-info">返回</button></div>
    </div>

</body>
<script>
    layui.use('carousel', function(){
        var carousel = layui.carousel;
        //建造实例
        carousel.render({
            elem: '#img'
            ,width: '100%' //设置容器宽度
            ,arrow: 'always' //始终显示箭头
            //,anim: 'updown' //切换动画方式
        });
    });

    function back() {
        window.history.go(-1);
    }
</script>
</html>